package com.ruoyi.consumer.domain.param;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.consumer.domain.CDealPerson;
import com.ruoyi.consumer.domain.CUser;

public class DealPersonDTO {
    private Long dealAmount;
    private Integer status;
    private String dealFacilitNum;
    private String createTime;
    private String userName;
    private String userPhone;

    // 构造器
    public DealPersonDTO(CDealPerson dealPerson, CUser user) {
        this.dealAmount = dealPerson.getDealAmount();
        this.status = dealPerson.getDealType();
        this.dealFacilitNum = dealPerson.getDealFacilitNum();
        this.createTime = DateUtils.parseDateToStr("YYYY-MM-DD HH:MM:SS", dealPerson.getCreateTime());

        if (user != null) {
            this.userName = user.getUserName();
            this.userPhone = user.getUserPhone();
        }
    }

    public Long getDealAmount() {
        return dealAmount;
    }

    public void setDealAmount(Long dealAmount) {
        this.dealAmount = dealAmount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDealFacilitNum() {
        return dealFacilitNum;
    }

    public void setDealFacilitNum(String dealFacilitNum) {
        this.dealFacilitNum = dealFacilitNum;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    // 省略 getter 和 setter 方法
}
